import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import body from '@/components/body'
import work from '@/components/work.vue'
import welcome from '@/components/welcome.vue'
import error from '@/components/error.vue'
import childView from '@/components/appMain.vue'


const resourceTree = resolve => {
  require(['@/views/interface/resource/tree.vue'], resolve)
}; //
const resourceList = resolve => {
  require(['@/views/interface/resource/list.vue'], resolve)
}; //
const resourceEdit = resolve => {
  require(['@/views/interface/resource/edit.vue'], resolve)
}; //
const resourceReName = resolve => {
  require(['@/views/interface/resource/rename.vue'], resolve)
}; //
const templateTree = resolve => {
  require(['@/views/interface/template/tree.vue'], resolve)
}; //
const templateList = resolve => {
  require(['@/views/interface/template/list.vue'], resolve)
}; //
const templateEdit = resolve => {
  require(['@/views/interface/template/edit.vue'], resolve)
}; //
const templateReName = resolve => {
  require(['@/views/interface/template/rename.vue'], resolve)
}; //
const templateSetting = resolve => {
  require(['@/views/interface/template/setting.vue'], resolve)
}; //

function $importViews(componentName) { //异步加载组件
  return resolve => {
    require(['@/views/' + componentName + '.vue'], resolve)
  }
}


Vue.use(Router)
/**
 * routes==默认路由节点
 */
export const routes = [
  {
    path: '/',
    name: '欢迎页',
    component: body,
    meta: {
      role: 'welcome'
    },
    iconCls: 'el-icon-house',
    leaf: true,
    redirect: '/welcome',
    children: [{
      path: '/welcome',
      component: welcome,
    }]
  },
  {
    path: '/error',
    name: '错误',
    component: error,
    hidden: true
  },
  {
    path: '/login',
    name: '登录',
    component: login,
    hidden: true
  },
  {
    path: '/newsList',
    name: '组版管理',
    component: body,
    hidden: true,
    redirect: '/content/groupEdition/list',
    children: [
      {
        path: '/content/groupEdition/list',
        name: '文章列表',
        component: resolve => {
          require(['@/views/content/groupEdition/news/list.vue'], resolve)
        }
      }
    ]
  },
];

export const ansycRoutes = [
  {
    path: '/optWork',
    name: ' 工作平台',
    component: body,
    iconCls: 'el-icon-monitor',
    children: [
      {
        path: '/work',
        name: '今日数据',
        component: childView,
        isParent: true,
        redirect: '/work',
        children: [{
          path: '/work',
          component: work,
        }]
      }, {
        path: '/content/editing',
        name: '编辑平台',
        isParent: true,
        component: childView,
        redirect: '/content/editing/list',
        children: [
          {
            path: '/content/editing/list',
            name: '文章列表',
            component: resolve => {
              require(['@/views/content/content/editingPlatform/list.vue'], resolve)
            }
          }, {
            path: '/content/editing/save',
            name: '文章添加',
            component: resolve => {
              require(['@/views/content/content/editingPlatform/add.vue'], resolve)
            }
          }, {
            path: '/content/editing/update',
            name: '文章修改',
            component: resolve => {
              require(['@/views/content/content/editingPlatform/edit.vue'], resolve)
            }
          }
        ]
      }, {
        path: '/toSignPlatform',
        name: '待签发平台',
        isParent: true,
        component: childView,
        redirect: '/content/toSign/list',
        children: [
          {
            path: '/content/toSign/list',
            name: '文章列表',
            component: resolve => {
              require(['@/views/content/content/toSignPlatform/list.vue'], resolve)
            }
          }, {
            path: '/content/toSign/update',
            name: '文章修改',
            component: resolve => {
              require(['@/views/content/content/toSignPlatform/edit.vue'], resolve)
            }
          }
        ]
      }, {
        path: '/signPlatform',
        name: '已签发平台',
        isParent: true,
        component: childView,
        redirect: '/content/sign/list',
        children: [
          {
            path: '/content/sign/list',
            name: '文章列表',
            component: resolve => {
              require(['@/views/content/content/signPlatform/list.vue'], resolve)
            }
          }, {
            path: '/content/sign/update',
            name: '文章修改',
            component: resolve => {
              require(['@/views/content/content/signPlatform/edit.vue'], resolve)
            }
          }
        ]
      }, {
        path: '/contentCycle',
        name: '回收站',
        component: childView,
        isParent: true,
        redirect: '/content/contentCycle/list',
        children: [
          {
            path: '/content/contentCycle/list',
            name: '回收站列表',
            component: resolve => {
              require(['@/views/content/content/contentCycle/list.vue'], resolve)
            },
          }
        ]
      }, {
        path: '/attachment',
        name: '附件管理',
        component: childView,
        isParent: true,
        redirect: '/attachment/pageList',
        children: [
          {
            path: '/attachment/pageList',
            name: '附件列表',
            component: resolve => {
              require(['@/views/operate/attachment/list.vue'], resolve)
            }
          }, {
            path: '/attachment/update',
            name: '附件编辑',
            component: resolve => {
              require(['@/views/operate/attachment/edit.vue'], resolve)
            }
          }
        ]
      }, {
        path: '/topic',
        name: '专题管理', //专题管理
        component: childView,
        isParent: true,
        redirect: '/topic/list',
        children: [{
          path: '/topic/list',
          name: '专题列表',
          component: resolve => {
            require(['@/views/content/topic/list.vue'], resolve)
          }
        }, {
          path: '/topic/save',
          name: '专题添加',
          component: resolve => {
            require(['@/views/content/topic/edit.vue'], resolve)
          }
        }, {
          path: '/topic/update',
          name: '专题修改',
          component: resolve => {
            require(['@/views/content/topic/edit.vue'], resolve)
          }
        }
        ]
      }, {
        path: '/channel', //频道
        name: '频道管理',
        component: childView,
        redirect: '/channel/list',
        isParent: true,
        children: [{
          path: '/channel/list',
          name: '频道列表', //频道列表
          component: resolve => {
            require(['@/views/channel/list.vue'], resolve)
          },
          hidden: true,
        }, {
          path: '/channel/save',
          name: '频道添加', //频道添加
          component: resolve => {
            require(['@/views/channel/add.vue'], resolve)
          },
          hidden: true,
        }, {
          path: '/channel/update',
          name: '频道修改', //频道修改
          component: resolve => {
            require(['@/views/channel/edit.vue'], resolve)
          },
          hidden: true,
        }, {
          path: '/channel/copy',
          name: '频道复制', //频道复制
          component: resolve => {
            require(['@/views/channel/copy.vue'], resolve)
          },
          hidden: true,
        }]
      }, {
        path: '/tag',
        name: '标签管理', //内容管理
        component: childView,
        isParent: true,
        redirect: '/tag/pageList',
        children: [
          {
            path: '/tag/pageList',
            name: '标签列表',
            component: resolve => {
              require(['@/views/content/tag/list.vue'], resolve)
            }
          }, {
            path: '/tag/save',
            name: '标签添加',
            component: resolve => {
              require(['@/views/content/tag/edit.vue'], resolve)
            }
          }, {
            path: '/tag/update',
            name: '标签修改',
            component: resolve => {
              require(['@/views/content/tag/edit.vue'], resolve)
            }
          }]
      }, {
        path: '/keyword',
        name: '搜索关键词', //内容管理
        component: childView,
        isParent: true,
        redirect: '/keyword/pageList',
        children: [{
          path: '/keyword/pageList',
          name: '关键词列表',
          component: resolve => {
            require(['@/views/content/keyword/list.vue'], resolve)
          }
        }, {
          path: '/keyword/save',
          name: '关键词添加',
          component: resolve => {
            require(['@/views/content/keyword/edit.vue'], resolve)
          }
        }, {
          path: '/keyword/update',
          name: '关键词修改',
          component: resolve => {
            require(['@/views/content/keyword/edit.vue'], resolve)
          }
        }]
      }  ,{
        path: '/statically',
        name: '页面静态化',//页面静态化
        component: childView,
        children: [
          {
            path: '/statically/indexStatic',//首页静态化
            name: '首页静态化',
            component: resolve => {
              require(['@/views/operate/statically/indexStatic.vue'], resolve)
            },
          },
          {
            path: '/statically/channelStatic',//频道静态化
            name: '频道静态化',
            component: resolve => {
              require(['@/views/operate/statically/channelStatic.vue'], resolve)
            },
          }
          /*{
            path: '/statically/contentStatic',//内容静态化
            name: '内容静态化',
            component: resolve => {
              require(['@/views/operate/statically/contentStatic.vue'], resolve)
            },
          },*/
        ]
      },
    ]
  },
  {
    path: '/groupEditionManger',
    name: ' 组版管理',
    component: body,
    iconCls: 'el-icon-zuban',
    children: [
      {
        path: '/commonGroupEdition',
        name: '公共组版',
        component: childView,
        isParent: true,
        redirect: '/commonGroupEdition/pageList',
        children: [{
          path: '/commonGroupEdition/pageList',
          name: '公共组版列表',
          component: resolve => {
            require(['@/views/content/groupEdition/common/list.vue'], resolve)
          },
        }]
      },
      {
        path: '/appGroupEdition',
        name: 'APP首页组版',
        component: childView,
        isParent: true,
        redirect: '/appGroupEdition/pageList',
        children: [{
          path: '/appGroupEdition/pageList',
          name: 'APP首页组版列表',
          component: resolve => {
            require(['@/views/content/groupEdition/app/list.vue'], resolve)
          },
        }]
      },
      {
        path: '/pcGroupEdition',
        name: 'PC首页组版',
        component: childView,
        isParent: true,
        redirect: '/pcGroupEdition/pageList',
        children: [{
          path: '/pcGroupEdition/pageList',
          name: 'PC首页组版列表',
          component: resolve => {
            require(['@/views/content/groupEdition/pc/list.vue'], resolve)
          },
        }]
      },
      {
        path: '/channelGroupEdition',
        name: '频道组版',
        component: childView,
        isParent: true,
        redirect: '/channelGroupEdition/pageList',
        children: [{
          path: '/channelGroupEdition/pageList',
          name: '频道组版列表',
          component: resolve => {
            require(['@/views/content/groupEdition/channel/list.vue'], resolve)
          },
        }]
      }
    ]
  }, {
    path: '/liveManger',
    name: ' 直播管理',
    component: body,
    iconCls: 'el-icon-video-camera',
    children: [
      {
        path: '/liveUser',
        name: '用户管理',
        component: childView,
        isParent: true,
        redirect: '/liveUser/pageList',
        children: [{
          path: '/liveUser/pageList',
          name: '直播用户列表',
          component: resolve => {
            require(['@/views/sysLive/user/list.vue'], resolve)
          },
        }, {
          path: '/liveUser/save',
          name: '直播用户新增',
          component: resolve => {
            require(['@/views/sysLive/user/edit.vue'], resolve)
          },
          hidden: true
        }, {
          path: '/liveUser/update',
          name: '直播用户修改',
          component: resolve => {
            require(['@/views/sysLive/user/edit.vue'], resolve)
          },
          hidden: true
        }, {
          path: '/liveUser/editPw',
          name: '修改密码',
          component: resolve => {
            require(['@/views/sysLive/user/editPw.vue'], resolve)
          },
          hidden: true
        }]
      },
      {
        path: '/sysLive',
        name: '直播管理',
        component: childView,
        isParent: true,
        redirect: '/sysLive/pageList',
        children: [{
          path: '/sysLive/pageList',
          name: '直播列表',
          component: resolve => {
            require(['@/views/sysLive/live/list.vue'], resolve)
          },
        }, {
          path: '/sysLive/save',
          name: '直播新增',
          component: resolve => {
            require(['@/views/sysLive/live/edit.vue'], resolve)
          },
          hidden: true
        }, {
          path: '/sysLive/update',
          name: '直播修改',
          component: resolve => {
            require(['@/views/sysLive/live/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }
    ]
  },
  {
    path: '/questionManger',
    name: '问答管理',
    component: body,
    iconCls: 'el-icon-chat-dot-round',
    children: [{
      path: '/problemTopic',
      name: '话题列表',
      component: childView,
      isParent: true,
      redirect: '/problemTopic/pageList',
      children: [{
        path: '/problemTopic/pageList',
        name: '话题列表',
        component: resolve => {
          require(['@/views/problem/problemTopic/list.vue'], resolve)
        },
      }, {
        path: '/problemTopic/save',
        name: '话题新增',
        component: resolve => {
          require(['@/views/problem/problemTopic/edit.vue'], resolve)
        },
        hidden: true
      }, {
        path: '/problemTopic/update',
        name: '话题修改',
        component: resolve => {
          require(['@/views/problem/problemTopic/edit.vue'], resolve)
        },
        hidden: true
      }
      ]
    }, {
      path: '/problem',
      name: '话题问题',
      component: childView,
      isParent: true,
      redirect: '/problem/pageList',
      children: [{
        path: '/problem/pageList',
        name: '话题问题列表',
        component: resolve => {
          require(['@/views/problem/problem/list.vue'], resolve)
        },
      }, {
        path: '/problem/save',
        name: '添加',
        component: resolve => {
          require(['@/views/problem/problem/edit.vue'], resolve)
        },
        hidden: true
      }, {
        path: '/problem/update',
        name: '修改',
        component: resolve => {
          require(['@/views/problem/problem/edit.vue'], resolve)
        },
        hidden: true
      }
      ]
    }, {
      path: '/userProblem',
      name: '用户问题',
      component: childView,
      isParent: true,
      redirect: '/userProblem/pageList',
      children: [{
        path: '/userProblem/pageList',
        name: '用户问题列表',
        component: resolve => {
          require(['@/views/problem/userProblem/list.vue'], resolve)
        },
      }, {
        path: '/userProblem/update',
        name: '用户问题修改',
        component: resolve => {
          require(['@/views/problem/userProblem/edit.vue'], resolve)
        },
        hidden: true
      }
      ]
    }]
  },
  {
    path: '/mall',
    name: '商城管理',
    component: body,
    iconCls: 'el-icon-goods',
    children: [
      {
        path: '/goodsType',
        name: '商品类型',
        component: childView,
        isParent: true,
        redirect: '/goodsType/pageList',
        children: [{
          path: '/goodsType/pageList',
          name: '商品类型列表',
          component: resolve => {
            require(['@/views/mall/goodsType/list.vue'], resolve)
          },
        }, {
          path: '/goodsType/save',
          name: '商品类型修改',
          component: resolve => {
            require(['@/views/mall/goodsType/edit.vue'], resolve)
          },
          hidden: true
        }, {
          path: '/goodsType/update',
          name: '商品类型修改',
          component: resolve => {
            require(['@/views/mall/goodsType/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }, {
        path: '/goodsTag',
        name: '商品分类',
        component: childView,
        isParent: true,
        redirect: '/goodsTag/pageList',
        children: [{
          path: '/goodsTag/pageList',
          name: '商品分类列表',
          component: resolve => {
            require(['@/views/mall/goodsTag/list.vue'], resolve)
          },
        }, {
          path: '/goodsTag/save',
          name: '商品分类新增',
          component: resolve => {
            require(['@/views/mall/goodsTag/edit.vue'], resolve)
          },
          hidden: true
        }, {
          path: '/goodsTag/update',
          name: '商品分类修改',
          component: resolve => {
            require(['@/views/mall/goodsTag/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }, {
        path: '/integralGoods',
        name: '商品列表', //app会员会员管理
        component: childView,
        isParent: true,
        redirect: '/integralGoods/pageList',
        children: [{
          path: '/integralGoods/pageList',
          name: '商品列表',
          component: resolve => {
            require(['@/views/mall/goods/list.vue'], resolve)
          },
        }, {
          path: '/integralGoods/save',
          name: '商品新增',
          component: resolve => {
            require(['@/views/mall/goods/edit.vue'], resolve)
          },
          hidden: true
        }, {
          path: '/integralGoods/update',
          name: '商品修改',
          component: resolve => {
            require(['@/views/mall/goods/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }
    ]
  },
  {
    path: '/appUserManager',
    name: '用户管理',
    component: body,
    iconCls: 'el-icon-user',
    meta: {
      isLink: true
    },
    children: [{
      path: '/appUser',
      name: '用户列表',
      component: childView,
      isParent: true,
      redirect: '/appUser/pageList',
      children: [{
        path: '/appUser/pageList',
        name: '会员列表',
        component: resolve => {
          require(['@/views/app/user/list.vue'], resolve)
        },
      }, {
        path: '/appUser/update',
        name: '会员修改',
        component: resolve => {
          require(['@/views/app/user/edit.vue'], resolve)
        },
        hidden: true
      }
      ]
    }, {
      path: '/integralLog',
      name: '积分记录',
      component: childView,
      isParent: true,
      redirect: '/integralLog/pageList',
      children: [{
        path: '/integralLog/pageList',
        name: '积分日志列表',
        component: resolve => {
          require(['@/views/app/integralLog/list.vue'], resolve)
        },
      }
      ]
    }, {
      path: '/exchangeGoods',
      name: '兑换记录',
      component: childView,
      isParent: true,
      redirect: '/exchangeGoods/pageList',
      children: [{
        path: '/exchangeGoods/pageList',
        name: '兑换列表',
        component: resolve => {
          require(['@/views/app/exchangeGoods/list.vue'], resolve)
        }
      },
        {
          path: '/exchangeGoods/update',
          name: '兑换编辑',
          component: resolve => {
            require(['@/views/app/exchangeGoods/edit.vue'], resolve)
          }
        }
      ]
    }, {
      path: '/factManger',
      name: '爆料列表', //操作日志
      component: childView,
      isParent: true,
      redirect: '/fact/pageList',
      children: [{
        path: '/fact/pageList',
        name: '爆料列表',
        component: resolve => {
          require(['@/views/app/fact/list.vue'], resolve)
        }
      }, {
        path: '/fact/update',
        name: '爆料查看',
        component: resolve => {
          require(['@/views/app/fact/edit.vue'], resolve)
        },
        hidden: true
      }]
    }
    ]
  },
  {
    path: '/systemManager',
    name: '系统管理', //用户管理
    component: body,
    iconCls: 'el-icon-s-tools',
    meta: {
      isLink: true
    },
    children: [{
      path: '/sysUser',
      name: '管理用户', //管理员(本站)
      component: childView,
      isParent: true,
      redirect: '/sysUser/pageList',
      children: [{
        path: '/sysUser/pageList', //管理员列表(本站)
        name: '管理用户列表',
        component: resolve => {
          require(['@/views/system/sysUser/list.vue'], resolve)
        },
      }, {
        path: '/sysUser/edit', //管理员编辑页(本站)
        name: '管理用户修改',
        component: resolve => {
          require(['@/views/system/sysUser/edit.vue'], resolve)
        },
      }, {
        path: '/sysUser/save', //管理员添加页(本站)
        name: '管理用户添加',
        component: resolve => {
          require(['@/views/system/sysUser/add.vue'], resolve)
        },
      }]
    }, {
      path: '/paperDoll',
      name: '公仔纸作者',
      component: childView,
      isParent: true,
      redirect: '/paperDoll/pageList',
      children: [{
        path: '/paperDoll/pageList',
        name: '会员列表',
        component: resolve => {
          require(['@/views/system/paperdoll/list.vue'], resolve)
        },
      }, {
        path: '/paperDoll/save',
        component: resolve => {
          require(['@/views/system/paperdoll/edit.vue'], resolve)
        },
        hidden: true
      }, {
        path: '/paperDoll/update',
        name: '会员修改',
        component: resolve => {
          require(['@/views/system/paperdoll/edit.vue'], resolve)
        },
        hidden: true
      }
      ]
    }, {
      path: '/columnist',
      name: '财经专栏作者',
      component: childView,
      isParent: true,
      redirect: '/columnist/pageList',
      children: [{
        path: '/columnist/pageList',
        name: '会员列表',
        component: resolve => {
          require(['@/views/system/columnist/list.vue'], resolve)
        },
      }, {
        path: '/columnist/save',
        component: resolve => {
          require(['@/views/system/columnist/edit.vue'], resolve)
        },
        hidden: true
      }, {
        path: '/columnist/update',
        name: '会员修改',
        component: resolve => {
          require(['@/views/system/columnist/edit.vue'], resolve)
        },
        hidden: true
      }
      ]
    }, {
      path: '/cultureColumnist',
      name: '文化专栏作者',
      component: childView,
      isParent: true,
      redirect: '/cultureColumnist/pageList',
      children: [{
        path: '/cultureColumnist/pageList',
        name: '会员列表',
        component: resolve => {
          require(['@/views/system/cultureColumnist/list.vue'], resolve)
        },
      }, {
        path: '/cultureColumnist/save',
        component: resolve => {
          require(['@/views/system/cultureColumnist/edit.vue'], resolve)
        },
        hidden: true
      }, {
        path: '/cultureColumnist/update',
        name: '会员修改',
        component: resolve => {
          require(['@/views/system/cultureColumnist/edit.vue'], resolve)
        },
        hidden: true
      }
      ]
    }, {
      path: '/role',
      name: '角色管理',
      component: childView,
      isParent: true,
      redirect: '/role/pageList',
      children: [{
        path: '/role/pageList',
        name: '角色管理',
        component: resolve => {
          require(['@/views/system/role/list.vue'], resolve)
        },
      }, {
        path: '/role/save',
        name: '角色添加',
        component: resolve => {
          require(['@/views/system/role/edit.vue'], resolve)
        },
        hidden: true
      }, {
        path: '/role/update',
        name: '角色修改',
        component: resolve => {
          require(['@/views/system/role/edit.vue'], resolve)
        },
        hidden: true
      }, {
        path: '/role/members',
        name: '成员列表',
        component: resolve => {
          require(['@/views/system/role/members.vue'], resolve)
        },
        hidden: true
      }
      ]
    }, {
      path: '/department',
      name: '部门管理',
      component: childView,
      isParent: true,
      redirect: '/department/list',
      children: [{
        path: '/department/tpm',
        name: '部门模板',
        component: resolve => {
          require(['@/views/system/department/departmentTmp.vue'], resolve)
        },
        children: [
          {
            path: '/department/list',
            name: '部门列表',
            component: resolve => {
              require(['@/views/system/department/list.vue'], resolve)
            },
          }, {
            path: '/department/save',
            name: '部门添加',
            component: resolve => {
              require(['@/views/system/department/add.vue'], resolve)
            },
          }, {
            path: '/department/update',
            name: '部门修改',
            component: resolve => {
              require(['@/views/system/department/edit.vue'], resolve)
            },
          }, {
            path: '/department/memberList',
            name: '部门成员列表',
            component: resolve => {
              require(['@/views/system/department/memberList.vue'], resolve)
            },
          }
        ]
      },
      ]
    }, {
      path: '/log',
      name: '操作日志', //操作日志
      component: childView,
      isParent: true,
      redirect: '/log/list',
      children: [{
        path: '/log/list', //日志列表
        name: '日志列表',
        component: resolve => {
          require(['@/views/system/optLog/list.vue'], resolve)
        },
      }]
    }]
  },
  {
    path: '/operate',
    component: body,
    iconCls: 'el-icon-data-line',
    name: '运营管理',
    meta: {
      isLink: true
    },
    children: [
      {
        path: '/area',
        name: '区域管理',
        component: childView,
        isParent: true,
        redirect: '/area/pageList',
        children: [{
          path: '/area/pageList',
          name: '区域列表',
          component: resolve => {
            require(['@/views/operate/area/list.vue'], resolve)
          },
        }, {
          path: '/area/update',
          name: '区域修改',
          component: resolve => {
            require(['@/views/operate/area/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }, {
        path: '/channelTotal',
        name: '频道访问统计',
        component: childView,
        isParent: true,
        redirect: '/channelTotal/list',
        children: [{
          path: '/channelTotal/list',
          name: '频道列表',
          component: resolve => {
            require(['@/views/operate/channel/list.vue'], resolve)
          }
        }, {
          path: '/channelTotal/chart',
          name: '频道访问统计',
          component: resolve => {
            require(['@/views/operate/channel/chart.vue'], resolve)
          },
          hidden: true,
        }
        ]
      }, {
        path: '/contentTotal',
        name: '文章访问统计',
        component: childView,
        isParent: true,
        redirect: '/content/contentTotal',
        children: [
          {
            path: '/content/contentTotal',
            name: '访问前50文章列表',
            component: resolve => {
              require(['@/views/operate/contentTotal/list.vue'], resolve)
            }
          }
        ]
      }, {
        path: '/contentSendTotal',
        name: '编辑发布量统计',
        component: childView,
        isParent: true,
        redirect: '/content/contentSendTotal',
        children: [
          {
            path: '/content/contentSendTotal',
            name: '编辑发布统计列表',
            component: resolve => {
              require(['@/views/operate/contentSendTotal/list.vue'], resolve)
            }
          }
        ]
      },{
        path: '/channelSendTotal',
        name: '频道发布量统计',
        component: childView,
        isParent: true,
        redirect: '/content/channelSendTotal',
        children: [
          {
            path: '/content/channelSendTotal',
            name: '频道发布量统计',
            component: resolve => {
              require(['@/views/operate/channelSendTotal/list.vue'], resolve)
            }
          }
        ]
      },{
        path: '/comment',
        name: '评论管理',
        component: childView,
        isParent: true,
        redirect: '/comment/pageList',
        children: [{
          path: '/comment/pageList',
          name: '评论列表',
          component: resolve => {
            require(['@/views/operate/comment/list.vue'], resolve)
          },
        }, {
          path: '/comment/itemList',
          name: '评论查看',
          component: resolve => {
            require(['@/views/operate/comment/itemList.vue'], resolve)
          },
        }
        ]
      }, {
        path: '/sensitivity',
        name: '敏感词管理',
        component: childView,
        isParent: true,
        redirect: '/sensitivity/list',
        children: [
          {
            path: '/sensitivity/list',
            name: '敏感词列表',
            component: resolve => {
              require(['@/views/operate/word/sensitivity/list.vue'], resolve)
            },
          },
        ]
      }, {
        path: '/pushTask',
        name: '推送管理',
        component: childView,
        isParent: true,
        redirect: '/pushTask/pageList',
        children: [
          {
            path: '/pushTask/pageList',
            name: '推送列表',
            component: resolve => {
              require(['@/views/operate/pushTask/list.vue'], resolve)
            },
          },
          {
            path: '/pushTask/save',
            name: '推送新增',
            component: resolve => {
              require(['@/views/operate/pushTask/edit.vue'], resolve)
            },
          },
        ]
      }, {
        path: '/html',
        name: '协议管理',
        component: childView,
        isParent: true,
        redirect: '/html/pageList',
        children: [{
          path: '/html/pageList',
          name: '协议列表',
          component: resolve => {
            require(['@/views/operate/agreement/list.vue'], resolve)
          },
        }, {
          path: '/html/update',
          name: '协议修改',
          component: resolve => {
            require(['@/views/operate/agreement/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }, {
        path: '/advManger',
        name: '广告管理',
        component: childView,
        isParent: true,
        redirect: '/adv/pageList',
        children: [{
          path: '/adv/pageList',
          name: '广告列表',
          component: resolve => {
            require(['@/views/operate/adv/list.vue'], resolve)
          },
        }, {
          path: '/adv/save',
          name: '广告新增',
          component: resolve => {
            require(['@/views/operate/adv/edit.vue'], resolve)
          },
          hidden: true
        }, {
          path: '/adv/update',
          name: '广告修改',
          component: resolve => {
            require(['@/views/operate/adv/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }, {
        path: '/advApplyManger',
        name: '广告投放', //app会员会员管理
        component: childView,
        isParent: true,
        redirect: '/advApply/pageList',
        children: [{
          path: '/advApply/pageList',
          name: '投放申请列表',
          component: resolve => {
            require(['@/views/operate/advApply/list.vue'], resolve)
          },
        }, {
          path: '/advApply/update',
          name: '广告投放处理',
          component: resolve => {
            require(['@/views/operate/advApply/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }, {
        path: '/appVersion',
        name: '版本管理',
        component: childView,
        isParent: true,
        redirect: '/appVersion/pageList',
        children: [{
          path: '/appVersion/pageList',
          name: '版本列表',
          component: resolve => {
            require(['@/views/operate/appVersion/list.vue'], resolve)
          },
        }, {
          path: '/appVersion/update',
          name: '版本修改',
          component: resolve => {
            require(['@/views/operate/appVersion/edit.vue'], resolve)
          },
          hidden: true
        }
        ]
      }, {
        path: '/feedbackManger',
        name: '意见反馈',
        component: childView,
        isParent: true,
        redirect: '/feedback/pageList',
        children: [{
          path: '/feedback/pageList',
          name: '反馈列表',
          component: resolve => {
            require(['@/views/operate/feedback/list.vue'], resolve)
          },
        }, {
          path: '/feedback/update',
          name: '反馈修改',
          component: resolve => {
            require(['@/views/operate/feedback/edit.vue'], resolve)
          },
          hidden: true
        }]
      }, {
        path: '/message',
        name: '系统消息', //系统消息管理
        component: childView,
        isParent: true,
        redirect: '/message/pageList',
        children: [{
          path: '/message/pageList', //系统消息列表
          name: '系统消息列表',
          component: resolve => {
            require(['@/views/operate/message/list.vue'], resolve)
          },
        }, {
          path: '/message/save', //发送系统消息
          name: '新增系统消息',
          component: resolve => {
            require(['@/views/operate/message/edit.vue'], resolve)
          },
        }, {
          path: '/message/update', //发送系统消息
          name: '编辑系统消息',
          component: resolve => {
            require(['@/views/operate/message/edit.vue'], resolve)
          },
        }]
      }
    ]
  },
  {
    path: '/config',
    component: body,
    iconCls: 'el-icon-setting',
    name: '配置',
    meta: {
      isLink: true
    },
    children: [{
      path: '/integralTask',
      name: '积分任务',
      component: childView,
      isParent: true,
      redirect: '/integralTask/pageList',
      children: [{
        path: '/integralTask/pageList',
        name: '积分任务列表',
        component: resolve => {
          require(['@/views/config/integralTask/list.vue'], resolve)
        },
      }, {
        path: '/integralTask/update',
        name: '积分任务修改',
        component: resolve => {
          require(['@/views/config/integralTask/edit.vue'], resolve)
        },
      }
      ]
    }, {
      path: '/internationalCode',
      name: '国际区号',
      component: childView, isParent: true,
      redirect: '/internationalCode/pageList',
      children: [{
        path: '/internationalCode/pageList',
        name: '国际区号列表',
        component: resolve => {
          require(['@/views/config/internationalCode/list.vue'], resolve)
        },
      }, {
        path: '/internationalCode/save',
        name: '国际区号修改',
        component: resolve => {
          require(['@/views/config/internationalCode/edit.vue'], resolve)
        },
      }, {
        path: '/internationalCode/update',
        name: '国际区号修改',
        component: resolve => {
          require(['@/views/config/internationalCode/edit.vue'], resolve)
        },
      }
      ]
    }, {
      path: '/commonConfig',
      name: '常规配置',
      component: childView,
      isParent: true,
      redirect: '/commonConfig/pageList',
      children: [{
        path: '/commonConfig/pageList',
        name: '常规配置列表',//oss管理列表
        component: resolve => {
          require(['@/views/config/commonConfig/list.vue'], resolve)
        },
      }, {
        path: '/commonConfig/update',
        name: '常规配置修改',
        component: resolve => {
          require(['@/views/config/commonConfig/edit.vue'], resolve)
        },
      }
      ]
    }, {
      path: '/oss',
      name: 'OSS管理',//oss管理
      component: childView, isParent: true,
      redirect: '/oss/pageList',
      children: [{
        path: '/oss/pageList',
        name: 'OSS列表',//oss管理列表
        component: resolve => {
          require(['@/views/config/oss/list.vue'], resolve)
        },
      }, {
        path: '/oss/update',
        name: 'OSS修改',//oss管理修改
        component: resolve => {
          require(['@/views/config/oss/edit.vue'], resolve)
        },
      }
      ]
    }, {
      path: '/type',
      name: '内容类型',//内容类型
      component: childView, isParent: true,
      redirect: '/type/list',
      children: [
        {
          path: '/type/list',
          name: '内容类型列表',//内容类型列表
          component: resolve => {
            require(['@/views/config/type/list.vue'], resolve)
          },
        },
        {
          path: '/type/add',
          name: '内容类型添加',//内容类型添加
          component: resolve => {
            require(['@/views/config/type/edit.vue'], resolve)
          },
        },
        {
          path: '/type/edit',
          name: '内容类型修改',//内容类型修改
          component: resolve => {
            require(['@/views/config/type/edit.vue'], resolve)
          },
        }
      ]
    }, {
      path: '/model',
      name: '模型管理',//模型管理
      component: childView,
      isParent: true,
      redirect: '/model/list',
      children: [{
        path: '/model/list',
        name: '模型列表',//模型管理列表
        component: resolve => {
          require(['@/views/config/model/list.vue'], resolve)
        },
      }, {
        path: '/model/add',
        name: '模型添加',//模型管理添加
        component: resolve => {
          require(['@/views/config/model/edit.vue'], resolve)
        },
      }, {
        path: '/model/edit',
        name: '模型修改',//模型管理修改
        component: resolve => {
          require(['@/views/config/model/edit.vue'], resolve)
        },
      },
        {
          path: '/channelModel/list',
          name: '频道模型字段列表',//频道模型
          component: resolve => {
            require(['@/views/config/model/item/channel/list.vue'], resolve)
          }
        },
        {
          path: '/channelModel/update',
          name: '频道模型字段修改',//频道模型项修改
          component: resolve => {
            require(['@/views/config/model/item/channel/edit.vue'], resolve)
          }
        },
        {
          path: '/channelModel/save',
          name: '频道模型字段添加',//频道模型项添加
          component: resolve => {
            require(['@/views/config/model/item/channel/edit.vue'], resolve)
          }
        },
        {
          path: '/contentModel/list',
          name: '内容模型字段模型',//内容模型
          component: resolve => {
            require(['@/views/config/model/item/content/list.vue'], resolve)
          }
        },
        {
          path: '/contentModel/update',
          name: '内容模型字段修改',//内容模型项修改
          component: resolve => {
            require(['@/views/config/model/item/content/edit.vue'], resolve)
          }
        },
        {
          path: '/contentModel/save',
          name: '内容模型字段添加',//内容模型项添加
          component: resolve => {
            require(['@/views/config/model/item/content/edit.vue'], resolve)
          }
        }
      ]
    },
      {
        path: '/crontab',
        name: '定时任务', //定时任务
        component: childView,
        isParent: true,
        redirect: '/crontab/list',
        children: [{
          path: '/crontab/list', //定时任务列表
          name: '定时任务列表',
          component: resolve => {
            require(['@/views/operate/crontab/list.vue'], resolve)
          },
        }, {
          path: '/crontab/save', //定时任务添加
          name: '定时任务添加',
          component: resolve => {
            require(['@/views/operate/crontab/edit.vue'], resolve)
          },
        }, {
          path: '/crontab/update', //定时任务修改
          name: '定时任务修改',
          component: resolve => {
            require(['@/views/operate/crontab/edit.vue'], resolve)
          },
        }]
      },{
        path: '/ftp',
        name: 'FTP管理',//ftp管理
        component: childView, isParent: true,
        redirect: '/ftp/list',
        children: [
          {
            path: '/ftp/list',
            name: 'FTP列表',//ftp管理列表
            component: resolve => { require(['@/views/config/ftp/list.vue'], resolve) },
          }, {
            path: '/ftp/add',
            name: 'FTP添加',//ftp管理添加
            component: resolve => { require(['@/views/config/ftp/edit.vue'], resolve) },
          }, {
            path: '/ftp/edit',
            name: 'FTP修改',//ftp管理修改
            component: resolve => { require(['@/views/config/ftp/edit.vue'], resolve) },
          }
        ]
      } /* {
        path: '/template',
        name: '模板',
        component: childView,
        isParent: true,
        redirect: '/template/mange',
        children: [
          {
            path: '/template/mange',
            name: '模板管理',
            component: templateTree,
            hidden: true,
            children: [
              {
                path: '/templatelist',
                name: '模板列表',
                component: templateList,
                hidden: true
              },
              {
                path: '/templateadd',
                name: '模板添加',
                component: templateEdit,
                hidden: true
              },
              {
                path: '/templateedit',
                name: '模板修改',
                component: templateEdit,
                hidden: true
              },
              {
                path: '/templaterename',
                name: '模板重命名',
                component: templateReName,
                hidden: true
              }, {
                path: '/templatesetting',
                name: '模板设置',
                component: templateSetting,
                hidden: true
              }
            ]
          }
        ]
      },
      {
        path: '/globel',
        name: '全局设置',//全局设置
        component: childView,
        children: [
          {
            path: '/globel/systemUpdate',
            name: '系统设置',//全局设置-系统设置
            component: resolve => {
              require(['@/views/config/config/systemUpdate.vue'], resolve)
            },
          },
          {
            path: '/globel/loginUpdate',
            name: '登录设置',//全局设置-登录设置
            component: resolve => {
              require(['@/views/config/config/loginUpdate.vue'], resolve)
            },
          },
          {
            path: '/globel/memberUpdate',
            name: '会员设置',//全局设置-会员设置
            component: resolve => {
              require(['@/views/config/config/memberUpdate.vue'], resolve)
            },
          },
          {
            path: '/globel/registerModel',
            name: '会员注册管理',//全局设置-会员注册管理
            component: childView,
            redirect: '/globel/registerModel/list',
            children: [{
              path: '/globel/registerModel/list',
              name: '会员注册列表',//全局设置-会员注册管理列表
              component: resolve => {
                require(['@/views/config/config/memberRegister/list.vue'], resolve)
              },
            },
              {
                path: '/globel/registerModel/add',
                name: '会员注册添加',//全局设置-会员注册管理添加
                component: resolve => {
                  require(['@/views/config/config/memberRegister/edit.vue'], resolve)
                },
              },
              {
                path: '/globel/registerModel/edit',
                name: '会员注册修改',//全局设置-会员注册管理修改
                component: resolve => {
                  require(['@/views/config/config/memberRegister/edit.vue'], resolve)
                },
              }
            ]
          },
          {
            path: '/globel/markUpdate',
            name: '水印设置',//全局设置-水印设置
            component: resolve => {
              require(['@/views/config/config/markUpdate.vue'], resolve)
            },
          },
          {
            path: '/globel/firewallUpdate',
            name: '防火墙设置',//全局设置-防火墙设置
            component: resolve => {
              require(['@/views/config/config/firewallUpdate.vue'], resolve)
            },
          },
          {
            path: '/globel/attrUpdate',
            name: '其他设置',//全局设置-其他设置
            component: resolve => {
              require(['@/views/config/config/attrUpdate.vue'], resolve)
            },
          },
          {
            path: '/globel/companyUpdate',
            name: '机构信息设置',//全局设置-机构信息设置
            component: resolve => {
              require(['@/views/config/config/companyUpdate.vue'], resolve)
            },
          },
          {
            path: '/globel/contentUpdate',
            name: '内容佣金设置',//全局设置-内容佣金设置
            component: resolve => {
              require(['@/views/config/config/contentUpdate.vue'], resolve)
            },
          },
        ]
      },*/
    ]
  },
  {
    path: '*',
    name: '404',
    component: error,
    meta: {
      role: 'index'
    },
    hidden: true
  }
];
